// 关于我页面组件样式
@use '../variables' as *;
.about-page {
    min-height: 100vh;
    background-color: #f8fafc;
}

// 主要内容区域样式
.main-content {
    padding-top: 64px;
    padding-bottom: 40px;
    min-height: calc(100vh - 64px); // 减去导航栏高度，避免出现空白
    background: url('/src/assets/pic/about_bg.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

// 个人介绍区域样式
.hero-section {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: $radius-xl;
    margin: 20px;
    box-shadow: $shadow-md;
    border: 1px solid rgba(229, 231, 235, 0.3);
    transition: all $transition-normal;
    &:hover {
        background: rgba(255, 255, 255, 0.6);
        transform: translateY(-2px);
        box-shadow: $shadow-lg;
    }
    .hero-background {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
        .code-decoration {
            position: absolute;
            top: 20px;
            right: 20px;
            opacity: 0.1;
            pre {
                margin: 0;
                font-size: 12px;
                color: #667eea;
                font-family: 'Courier New', monospace;
            }
        }
    }
    .hero-content {
        position: relative;
        z-index: 2;
    }
    .avatar-container {
        margin-bottom: 32px;
        .avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            overflow: hidden;
            margin: 0 auto;
            box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
            position: relative;
            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
            &::before {
                content: '';
                position: absolute;
                top: -4px;
                left: -4px;
                right: -4px;
                bottom: -4px;
                border-radius: 50%;
                background: linear-gradient(135deg, #3B82F6, #1D4ED8, #10B981);
                z-index: -1;
                opacity: 0.3;
                animation: pulse 2s infinite;
            }
        }
    }
    .hero-title {
        font-size: 4rem;
        font-weight: 900;
        font-family: 'Poppins', 'Segoe UI', sans-serif;
        margin: 0 0 24px 0;
        position: relative;
        text-transform: uppercase;
        letter-spacing: 2px;
        animation: fadeInUp 1s ease-out;
        // 主要文字
        &::before {
            content: attr(data-text);
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 50%, #7C3AED 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
        }
        // 发光效果
        &::after {
            content: attr(data-text);
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 50%, #7C3AED 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            filter: blur(8px);
            opacity: 0.7;
            z-index: -1;
            animation: glow 2s ease-in-out infinite alternate;
        }
        // 装饰性边框
        .title-border {
            position: absolute;
            top: -10px;
            left: -20px;
            right: -20px;
            bottom: -10px;
            border: 2px solid transparent;
            background: linear-gradient(135deg, #3B82F6, #1D4ED8, #7C3AED, #3B82F6);
            background-size: 400% 400%;
            border-radius: 20px;
            opacity: 0.1;
            animation: borderGlow 3s ease-in-out infinite;
            z-index: -2;
        }
        // 文字内容
        span {
            position: relative;
            z-index: 1;
            display: inline-block;
            transform: perspective(1000px) rotateX(15deg);
            transition: all 0.3s ease;
            &:hover {
                transform: perspective(1000px) rotateX(0deg) scale(1.05);
                filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.5));
            }
        }
    }
    .tech-tags {
        display: flex;
        justify-content: center;
        gap: 16px;
        margin-bottom: 32px;
        flex-wrap: wrap;
        .tech-tag {
            position: relative;
            padding: 12px 24px;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(248, 250, 252, 0.4) 100%);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            color: #1e293b;
            border-radius: 16px;
            font-size: 14px;
            font-weight: 600;
            letter-spacing: 0.3px;
            border: 1px solid rgba(148, 163, 184, 0.2);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.4);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            overflow: hidden;
            &::before {
                content: '';
                position: absolute;
                top: 0;
                left: -100%;
                width: 100%;
                height: 100%;
                background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
                transition: left 0.6s ease;
            }
            &::after {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 50%, #7C3AED 100%);
                border-radius: 16px;
                opacity: 0;
                transition: all 0.4s ease;
                z-index: -1;
            }
            &:hover {
                transform: translateY(-4px) scale(1.02);
                box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.15), 0 10px 10px -5px rgba(59, 130, 246, 0.1), 0 0 0 1px rgba(59, 130, 246, 0.2);
                color: white;
                border-color: rgba(59, 130, 246, 0.3);
                background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(248, 250, 252, 0.65) 100%);
                &::before {
                    left: 100%;
                }
                &::after {
                    opacity: 0.8;
                }
            }
            &:active {
                transform: translateY(-2px) scale(1.01);
                box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.2), 0 4px 6px -2px rgba(59, 130, 246, 0.1);
            }
            // 为不同技术标签添加不同的渐变色彩
            &:nth-child(3n+1) {
                &::after {
                    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 50%, #7C3AED 100%);
                }
            }
            &:nth-child(3n+2) {
                &::after {
                    background: linear-gradient(135deg, #10B981 0%, #059669 50%, #047857 100%);
                }
            }
            &:nth-child(3n+3) {
                &::after {
                    background: linear-gradient(135deg, #F59E0B 0%, #D97706 50%, #B45309 100%);
                }
            }
        }
    }
    .hero-description {
        font-size: 1.1rem;
        color: $text-primary;
        font-weight: $font-medium;
        line-height: 1.8;
        max-width: 800px;
        margin: 0 auto;
        animation: fadeInUp 1s ease-out 0.2s both;
    }
    .hero-actions {
        margin-top: 2rem;
        animation: fadeInUp 1s ease-out 0.4s both;
        .subscribe-btn {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(29, 78, 216, 0.8) 100%);
            border: 1px solid rgba(59, 130, 246, 0.3);
            border-radius: 12px;
            padding: 12px 24px;
            font-weight: 600;
            font-size: 1rem;
            color: white;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            &:hover {
                transform: translateY(-2px);
                box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
                background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(30, 64, 175, 0.9) 100%);
                border-color: rgba(59, 130, 246, 0.5);
            }
            .el-icon {
                margin-right: 8px;
            }
        }
    }
}

// 网站资讯区域样式
.stats-section {
    margin-bottom: 80px;
    .section-title {
        font-size: 2rem;
        font-weight: $font-bold;
        color: $text-primary;
        text-align: center;
        margin: 0 0 40px 0;
        position: relative;
        &::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 3px;
            background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
            border-radius: 2px;
        }
    }
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 24px;
        margin-bottom: 40px;
    }
    .stat-card {
        background: rgba(255, 255, 255, 0.6);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: $radius-lg;
        padding: 32px 24px;
        box-shadow: $shadow-md;
        border: 1px solid rgba(229, 231, 235, 0.3);
        transition: all $transition-normal;
        display: flex;
        align-items: center;
        gap: 20px;
        &:hover {
            transform: translateY(-4px);
            box-shadow: $shadow-lg;
            border-color: rgba(59, 130, 246, 0.2);
            background: rgba(255, 255, 255, 0.8);
        }
        .stat-icon {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            flex-shrink: 0;
        }
        .stat-content {
            flex: 1;
            .stat-number {
                font-size: 2rem;
                font-weight: $font-bold;
                color: $text-primary;
                margin: 0 0 4px 0;
                line-height: 1;
            }
            .stat-label {
                color: $text-secondary;
                font-size: 14px;
                margin: 0;
            }
        }
    }
    .last-update {
        background: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: $radius-lg;
        padding: 24px;
        box-shadow: $shadow-md;
        border: 1px solid rgba(229, 231, 235, 0.3);
        transition: all $transition-normal;
        &:hover {
            background: rgba(255, 255, 255, 0.7);
            transform: translateY(-2px);
            box-shadow: $shadow-lg;
        }
        .update-info {
            display: flex;
            align-items: center;
            gap: 8px;
            color: $text-primary;
            font-weight: $font-medium;
            margin-bottom: 8px;
        }
        .update-detail {
            color: $text-secondary;
            font-size: 14px;
            margin: 0;
        }
    }
}

// 贡献时间图区域样式
.contribution-section {
    margin-bottom: 80px;
    .section-title {
        font-size: 2rem;
        font-weight: $font-bold;
        color: $text-primary;
        text-align: center;
        margin: 0 0 40px 0;
        position: relative;
        &::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 3px;
            background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
            border-radius: 2px;
        }
    }
    .contribution-container {
        background: rgba(255, 255, 255, 0.45);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: $radius-lg;
        padding: 40px;
        box-shadow: $shadow-md;
        border: 1px solid rgba(229, 231, 235, 0.3);
        transition: all $transition-normal;
        &:hover {
            background: rgba(255, 255, 255, 0.65);
            transform: translateY(-2px);
            box-shadow: $shadow-lg;
        }
        .contribution-header {
            margin-bottom: 24px;
            .current-date {
                display: flex;
                align-items: center;
                gap: 8px;
                color: $text-primary;
                font-weight: $font-medium;
                font-size: 14px;
            }
        }
        .contribution-content {
            display: flex;
            gap: 24px;
            margin-bottom: 24px;
            .year-selector {
                display: flex;
                flex-direction: column;
                gap: 8px;
                .year-item {
                    padding: 8px 16px;
                    border-radius: $radius-md;
                    cursor: pointer;
                    transition: all $transition-normal;
                    font-size: 14px;
                    font-weight: $font-medium;
                    &:hover {
                        background: rgba(59, 130, 246, 0.1);
                        color: #3B82F6;
                    }
                    &.active {
                        background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
                        color: white;
                    }
                }
            }
            .contribution-graph {
                flex: 1;
                .months-labels {
                    display: grid;
                    grid-template-columns: repeat(12, 1fr);
                    gap: 2px;
                    margin-bottom: 8px;
                    .month-label {
                        font-size: 12px;
                        color: $text-secondary;
                        text-align: center;
                    }
                }
                .graph-container {
                    display: flex;
                    gap: 8px;
                    .weekday-labels {
                        display: flex;
                        flex-direction: column;
                        gap: 2px;
                        margin-right: 8px;
                        .weekday-label {
                            font-size: 12px;
                            color: $text-secondary;
                            height: 12px;
                            line-height: 12px;
                            margin-bottom: 2px;
                        }
                    }
                    .contribution-grid {
                        display: grid;
                        grid-template-columns: repeat(53, 1fr);
                        gap: 2px;
                        .contribution-cell {
                            width: 12px;
                            height: 12px;
                            border-radius: 2px;
                            cursor: pointer;
                            transition: all $transition-normal;
                            &.empty {
                                background-color: transparent;
                                cursor: default;
                                &:hover {
                                    transform: none;
                                    box-shadow: none;
                                }
                            }
                            &.level-0 {
                                background-color: #EBEDF0;
                            }
                            &.level-1 {
                                background-color: #9BE9A8;
                            }
                            &.level-2 {
                                background-color: #40C463;
                            }
                            &.level-3 {
                                background-color: #30A14E;
                            }
                            &.level-4 {
                                background-color: #216E39;
                            }
                            &:hover {
                                transform: scale(1.2);
                                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
                            }
                        }
                    }
                }
            }
        }
        .contribution-summary {
            margin-bottom: 24px;
            .summary-text {
                color: $text-secondary;
                font-size: 14px;
                text-align: center;
            }
        }
        .contribution-legend {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            .legend-label {
                font-size: 12px;
                color: $text-secondary;
            }
            .legend-cells {
                display: flex;
                gap: 2px;
                .legend-cell {
                    width: 12px;
                    height: 12px;
                    border-radius: 2px;
                    &.level-0 {
                        background-color: #EBEDF0;
                    }
                    &.level-1 {
                        background-color: #9BE9A8;
                    }
                    &.level-2 {
                        background-color: #40C463;
                    }
                    &.level-3 {
                        background-color: #30A14E;
                    }
                    &.level-4 {
                        background-color: #216E39;
                    }
                }
            }
        }
    }
}

// 作品展示区域样式
.portfolio-section {
    margin-bottom: 40px;
    .section-title {
        font-size: 2rem;
        font-weight: $font-bold;
        color: $text-primary;
        text-align: center;
        margin: 0 0 40px 0;
        position: relative;
        &::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 3px;
            background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
            border-radius: 2px;
        }
    }
    .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 32px;
    }
    .project-card {
        background: rgba(255, 255, 255, 0.35);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: $radius-lg;
        overflow: hidden;
        box-shadow: $shadow-md;
        border: 1px solid rgba(229, 231, 235, 0.3);
        transition: all $transition-normal;
        &:hover {
            transform: translateY(-4px);
            box-shadow: $shadow-lg;
            border-color: rgba(59, 130, 246, 0.2);
            background: rgba(255, 255, 255, 0.55);
        }
        .project-preview {
            height: 200px;
            overflow: hidden;
            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                transition: transform $transition-normal;
            }
        }
        .project-info {
            padding: 24px;
            .project-title {
                font-size: 1.25rem;
                font-weight: $font-bold;
                color: $text-primary;
                margin: 0 0 16px 0;
            }
            .project-tech {
                display: flex;
                gap: 8px;
                margin-bottom: 16px;
                flex-wrap: wrap;
                .tech-badge {
                    padding: 4px 12px;
                    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
                    color: white;
                    border-radius: 12px;
                    font-size: 12px;
                    font-weight: $font-medium;
                }
            }
            .project-description {
                color: $text-secondary;
                line-height: 1.6;
                margin: 0;
                font-size: 14px;
            }
        }
    }
}

// 动画效果
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

@keyframes glow {
    0% {
        filter: blur(8px) drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
        opacity: 0.7;
    }
    100% {
        filter: blur(12px) drop-shadow(0 0 30px rgba(59, 130, 246, 0.6));
        opacity: 0.9;
    }
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
        opacity: 0.1;
    }
    50% {
        background-position: 100% 50%;
        opacity: 0.2;
    }
    100% {
        background-position: 0% 50%;
        opacity: 0.1;
    }
}

// 响应式设计
@media (max-width: 1024px) {
    .hero-section {
        padding: 60px 0 40px;
        .hero-title {
            font-size: 3rem;
        }
        .hero-description {
            font-size: 1rem;
        }
    }
    .contribution-section .contribution-container .contribution-content {
        flex-direction: column;
        .year-selector {
            flex-direction: row;
            justify-content: center;
        }
    }
    .portfolio-section .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 0 15px;
    }
    .hero-section {
        padding: 40px 0 30px;
        .hero-title {
            font-size: 2.5rem;
        }
        .tech-tags {
            gap: 12px;
            .tech-tag {
                font-size: 12px;
                padding: 6px 12px;
            }
        }
    }
    .stats-section {
        margin-bottom: 60px;
        .stats-grid {
            grid-template-columns: 1fr;
            gap: 16px;
        }
        .stat-card {
            padding: 24px 20px;
            .stat-icon {
                width: 50px;
                height: 50px;
                font-size: 20px;
            }
            .stat-content .stat-number {
                font-size: 1.5rem;
            }
        }
    }
    .contribution-section {
        margin-bottom: 60px;
        .contribution-container {
            padding: 24px;
            .contribution-content {
                .contribution-graph {
                    .months-labels {
                        grid-template-columns: repeat(12, 1fr);
                        gap: 1px;
                        .month-label {
                            font-size: 10px;
                        }
                    }
                    .graph-container {
                        .weekday-labels {
                            .weekday-label {
                                font-size: 10px;
                                height: 10px;
                                line-height: 10px;
                            }
                        }
                        .contribution-grid {
                            grid-template-columns: repeat(53, 1fr);
                            gap: 1px;
                            .contribution-cell {
                                width: 10px;
                                height: 10px;
                            }
                        }
                    }
                }
            }
        }
    }
    .portfolio-section {
        margin-bottom: 60px;
        .portfolio-grid {
            grid-template-columns: 1fr;
            gap: 24px;
        }
    }
}

@media (max-width: 480px) {
    .hero-section {
        .hero-title {
            font-size: 2rem;
        }
        .hero-description {
            font-size: 0.9rem;
        }
    }
    .contribution-section .contribution-container {
        padding: 20px;
    }
}